package com.ai.dmc.index.common.bean;

import com.ai.dmc.index.common.util.DateUtil;

import net.sf.json.JSONObject;

/**
 * 
 * @Description : 日志Bean
 * 
 * @author : wucm
 * @date : 2015年4月6日 上午11:15:16
 * @version V1.0
 * 
 */
public class LogBean {
	private String logId;
	private String logContent;
	private String userId;
	private String userName;
	private String userIp;
	private String userMac;
	private String logTime;
	private String funcId;
	private String funcName;
	private String logType;

	private String searchKey;
	private String searchKeyLike;
	private String startDate;
	private String endDate;

	public String getFuncName() {
		return funcName;
	}

	public void setFuncName(String funcName) {
		this.funcName = funcName;
	}

	public String getSearchKey() {
		return searchKey;
	}

	public void setSearchKey(String searchKey) {
		this.searchKey = searchKey;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getFuncId() {
		return funcId;
	}

	public void setFuncId(String funcId) {
		this.funcId = funcId;
	}

	public String getLogType() {
		return logType;
	}

	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getLogId() {
		return logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	public String getLogContent() {
		return logContent;
	}

	public void setLogContent(String logContent) {
		this.logContent = logContent;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserIp() {
		return userIp;
	}

	public void setUserIp(String userIp) {
		this.userIp = userIp;
	}

	public String getUserMac() {
		return userMac;
	}

	public void setUserMac(String userMac) {
		this.userMac = userMac;
	}

	public String getLogTime() {
		return logTime;
	}

	public void setLogTime(String logTime) {
		this.logTime = logTime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * 返回json格式
	 * 
	 * @return
	 */
	public JSONObject getJSON() {
		JSONObject json = new JSONObject();
		json.put("logId", logId);
		json.put("logContent", logContent);
		json.put("funcId", funcId == null ? "" : funcId);
		json.put("funcName", funcName == null ? "" : funcName);
		json.put("userId", userId == null ? "" : userId);
		json.put("userName", userName == null ? "" : userName);
		json.put("userIp", userIp == null ? "" : userIp);
		json.put("userMac", userMac == null ? "" : userMac);
		json.put("logType", logType);
		json.put("logTime", logTime);
		json.put("logTime2", DateUtil.getInstance().dateFormat(logTime,
				"yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss"));

		return json;
	}

	public String getSearchKeyLike() {
		return searchKeyLike;
	}

	public void setSearchKeyLike(String searchKeyLike) {
		this.searchKeyLike = searchKeyLike;
	}
}
